﻿@model mvcForum.Web.Areas.ForumAPI.ViewModels.Forum
@{
	String ns = "MVCForum.ForumAdmin.Category.Index";
}
	<div id="newforummodal" class="modal hide" data-bind="css: { hide: AddHidden }">
		<div class="modal-header">
			<button type="button" class="close" data-bind="click: HideAdd">&times;</button>
			<h3>@Html.LocalizedString("AddHeading", ns)</h3>
		</div>
		<!-- ko with: CreateForumModal -->
		<div class="modal-body">
			@using (Html.BeginForm("create", "forum", new { area = "forumadmin", id = Model.Id })) {
				<fieldset>
					<legend class="hide"></legend>
					<div class="control-group" data-bind="css: { error: !Name.isValid() }">
						@Html.LabelFor(x => x.Name, new { @class = "control-label" })
						<div class="controls">
							@Html.TextBoxFor(x => x.Name, new { id = "forumname",  @class = "input-large", data_bind = "value: Name" })
						</div>
					</div>
					<div class="control-group">
						@Html.LabelFor(x => x.Description, new { @class = "control-label" })
						<div class="controls">
							@Html.TextAreaFor(x => x.Description, new { @class = "span6", rows = 5, data_bind = "value: Description" })
						</div>
					</div>
					<div class="control-group" data-bind="css: { error: !SortOrder.isValid() }">
						@Html.LabelFor(x => x.SortOrder, new { @class = "control-label" })
						<div class="controls">
							@Html.TextBoxFor(x => x.SortOrder, new { id = "forumsortorder", @class = "input-large", data_bind = "value: SortOrder" })
						</div>
					</div>
				</fieldset>
			}
		</div>
		<div class="modal-footer">
			<a href="#" class="btn" data-bind="click: $parent.HideAdd">@Html.LocalizedString("AddClose", ns)</a>
			<a href="#" class="btn btn-primary" data-bind="click: Create">@Html.LocalizedString("AddCreate", ns)</a>
		</div>
		<!-- /ko -->
	</div>
